function(ss_macro_cache_mittest case)
  mit_shared_storage_unittest(${case})
  target_compile_definitions(${case} PRIVATE UNITTEST_DEBUG)
  target_link_libraries(${case} PRIVATE observer_test)
  if (case MATCHES "^test_.*")
    set_tests_properties(${case} PROPERTIES TIMEOUT 600)
  endif()
endfunction()

if(OB_BUILD_CLOSE_MODULES)
  ss_macro_cache_mittest(test_ss_macro_cache_ckpt)
  ss_macro_cache_mittest(test_ss_macro_cache_evict_task)
  ss_macro_cache_mittest(test_ss_macro_cache_expire_task)
  ss_macro_cache_mittest(test_ss_macro_cache_mgr)
  ss_macro_cache_mittest(test_ss_macro_cache_replay)
  ss_macro_cache_mittest(test_ss_macro_cache_stat)
  ss_macro_cache_mittest(test_ss_write_cache_ctrl_task)
  ss_macro_cache_mittest(test_ss_macro_cache_mandatory_calibrate)
  ss_macro_cache_mittest(test_ss_macro_cache_preread_map_clear)
  ss_macro_cache_mittest(test_ss_macro_cache_calibrate)
  ss_macro_cache_mittest(test_ss_macro_cache_meta_expired)
  ss_macro_cache_mittest(test_ss_hot_tablet_major_compaction_prewarm)
endif()
